package controller
{
	import com.greensock.TweenLite;
	import com.greensock.plugins.TintPlugin;
	import com.greensock.plugins.TweenPlugin;
	
	import flash.events.Event;
	import flash.text.TextField;
	
	import model.vo.PageVO;
	
	import subumbo.micro.component.ClickDispatcher;
	import subumbo.micro.controller.ListItemViewController;

	public class NavItemViewController extends ListItemViewController
	{
		public var txt:TextField;
		
		override protected function init(e:Event):void
		{
			super.init(e);
			TweenPlugin.activate([TintPlugin]);
		}

		override public function set data(val:Object):void
		{
			txt.text = PageVO(val).name;
			super.data = val;
		}
		
		override public function set selected(val:Boolean):void
		{
			if(val == _selected) return;
			if(val)	TweenLite.to(txt, 0.4, {tint:0xFF0000});		
			else	TweenLite.to(txt, 0.4, {tint:0xEEEEEE});	
			super.selected = val;
		}
	}
}